function highAndLow(numbers){
    numbers = numbers.split(" ")
    let lowest = highest = parseInt(numbers[0]);
    numbers.forEach(item=>{
        item = parseInt(item)
        if(item>highest) highest = item;
        else if(item<lowest) lowest = item;
    })
    return `${highest} ${lowest}`
}

function highAndLow2(numbers){
    var arr = numbers.split(' ').sort(function(a, b) { return a - b });
    return arr[arr.length -1] + ' ' + arr[0];
}
console.log(highAndLow("4 5 29 54 4 0 -214 542 -64 1 -3 6 -6"));

function highAndLow3(numbers){
    numbers = numbers.split(' ');
    return `${Math.max(...numbers)} ${Math.min(...numbers)}`;
  }